package com.company.pangu.aliyun.live.response;

import com.company.pangu.aliyun.live.enums.PullProtocolType;
import com.company.pangu.aliyun.live.enums.StreamBitRateType;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>构建直播渠道（推拉流信息）</p >
 *
 * @author youyoukele
 * @version 1.0
 * @date 2021/10/31
 */
@Data
@Builder
public class BuildLiveChannelResponse {

    /**
     * 推流地址
     */
    private String pushUrl;

    /**
     * 拉流信息
     */
    private List<PullUrl> pullUrls;


    @Data
    @Accessors(chain = true)
    public static final class PullUrl {

        /**
         * 拉流协议rtmp,hls,flv
         */
        private PullProtocolType protocol;

        /**
         * 流信息
         */
        private List<Stream> streams;


        @Data
        @Accessors(chain = true)
        public static final class Stream {

            /**
             * 拉流地址
             */
            private String url;

            /**
             * 码率（清晰度）
             */
            private StreamBitRateType streamType;
        }

    }

}
